<?php
require_once 'jwt.php';
//定义载荷
$payload = ['user'=>'webrx','iat'=>time(),'exp'=>time()+60];
//生成token
$token = JWT::getToken($payload); //[status,msg,data[token]]
//输出token字符串
echo $token['data']['token'],'<br>';

$ts = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoid2VicngiLCJpYXQiOjE3MDY3MTQ4NDEsImV4cCI6MTcwNjcxNDkwMX0=.5f31a97167ec434ebb99357767f25e13d92fea5c';
echo '<pre>';
print_r(JWT::verifyToken($ts));
